package com.squirrel.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *  UserVideo 用户视频实体类
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@Data
@Accessors(chain = true)
@TableName("user_video")
@ApiModel(value = "用户视频", description = "")
public class UserVideo extends Model<UserVideo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户与视频id")
    @TableId(value = "user_video_id", type = IdType.AUTO)
    private Integer userVideoId;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("视频id")
    @TableField("video_id")
    private Integer videoId;

    @ApiModelProperty("是否喜欢（0不喜欢 1喜欢）")
    @TableField("is_enjoy")
    private Integer isEnjoy;

    @ApiModelProperty("是否收藏（0不收藏 1收藏）")
    @TableField("is_collect")
    private Integer isCollect;

    @ApiModelProperty("是否点赞  (0不点赞 1点赞)")
    @TableField("is_give_a_like")
    private Integer isGiveALike;

    @ApiModelProperty("评分（1到5）")
    @TableField("score")
    private Integer score;

    @ApiModelProperty("最近观看时间")
    @TableField("watched")
    private LocalDateTime watched;

    @Override
    public Serializable pkVal() {
        return this.userVideoId;
    }

}
